<h1>Protect</h1>

<p>Protect marks a file as not-readable, preventing the file from being loaded into an editor.</p>

<table>

<tr>
<th nowrap>Field Name</th>
<th>Type</th>
<th>Size</th>
<th>Description</th>
</tr>

<tr>
<td nowrap valign="top">type</td>
<td nowrap valign="top">unsigned bit</td>
<td nowrap valign="top" align="right">10</td>
<td>Identifies the Pointer instruction when it is encoded. It is encoded 
with the length field as a 16-bit integer (Little-endian byte order).</td>
</tr>

<tr>
<td nowrap valign="top">length</td>
<td nowrap valign="top">unsigned bit</td>
<td nowrap valign="top" align="right">6</td>
<td>The length in bytes of the body of the instruction when it is encoded. Encoded with the type 
field as a 16-bit integer. If the length is greater than 62 bytes then this field
is set to 0x3F and the next field, extendedLength contains the length of the
body of the encoded instruction.</td>
</tr>

<tr>
<td nowrap valign="top">extendedLength</td>
<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">32</td>
<td>Optional. Contains the length in bytes of the encoded instruction if it is
greater than 62 bytes. If the length is 62 bytes or less then this field is 
omitted.</td>
</tr>

<tr>
<td nowrap valign="top">password</td>
<td nowrap valign="top">String</td>
<td nowrap valign="top" align="right">[length]</td>
<td>An MD-5 encrypted password.</td>
</tr>

</table>

<p>In order to use the debugger a password must be supplied. When encrypted using 
the MD5 algorithm it must match the value stored in the password attribute.</p>

<p>IMPORTANT: this form of protection only works with Macromedia's Flash Authoring 
tool. Any application that parses Flash files can choose to ignore or delete this 
data structure therefore it is not safe to use this to protect the contents of a 
Flash file.</p>

<p>Transform will parse all Flash files containing the Protect data structure. 
Since the encoded data is can be removed by trivial scripts the level of copy-protection 
offered is minimal. Indeed the use of the Protect mechanism in Flash movies may 
lead to a false sense of security, putting proprietary information at risk. 
Sensitive information should not be included in Flash movies.</p>

<h2>History</h2>

<p>The Protect instruction represents the Protect tag from the Macromedia Flash 
(SWF) File Format Specification. It was introduced in Flash 2. The password 
attribute was added in Flash 5.</p>
